<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>新建简历</title>
<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="css/validator.css" />
<link rel="stylesheet" href="css/howitworks.css" />
<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/pixie.css" />

<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery.ui.widget.js"></script>

<script type="text/javascript" src="js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="js/jquery.ui.button.js"></script>
<script type="text/javascript" src="js/jquery.ui.position.js"></script>

<script type="text/javascript" src="js/formValidator.js"></script>
<script type="text/javascript" src="js/formValidatorRegex.js"></script>
<script type="text/javascript" src="js/DateTimeMask.js"></script>

<% 
String latestResumeId = session.getAttribute( "latest-edit-resumeid") == null ? "-1" : session.getAttribute( "latest-edit-resumeid").toString(); 
%>

<script type="text/javascript">

window.onbeforeunload = function()
{
	if(Math.abs(event.clientX - document.body.clientWidth) < 30)
	{
		if (confirm('确实要退出简历管理？'))
			window.location.href("login.action");
		else
			event.returnValue = '请点取消留在本页面！';
	}
}

function init() {
    document.body.oncontextmenu=function(){return false;}
}

function click()   {                                                                                                                             
	if(event.ctrlKey && event.keyCode == 67)   {                                                                                                                     
		return false;                                                          
	}                                                                                                                                                               
}                                                                                                                                                               
document.onkeydown=click;

$(document).ready(function() {
		init();
		//$('#backupLocation').button();
		//$('#restoreLocation').button();
		$('#systemBackupButton').button();
		$('#systemRestoreButton').button();
		
		if (document.getElementById("resule").value == 1) {
			alert("备份成功");
		} else if (document.getElementById("resule").value == 2) {
			alert("备份失败");
		} else if (document.getElementById("resule").value == 3) {
			alert("还原成功");
		} else if (document.getElementById("resule").value == 4) {
			alert("还原失败");
		}
	});
	
	function backupSystemFun() {
		if (window.confirm("是否要备份系统?"))
		{
			document.getElementById("managerType").value = 1;
			document.getElementById("system-manager").submit();
		}
	}
	function restoreSystemFun() {
		if (window.confirm("是否要还原系统?"))
		{
			document.getElementById("managerType").value = 2;
			document.getElementById("system-manager").submit();
		}
	}
</script>
</head>
<body bgcolor="#ECF5FF">
<div class="top_bar">
	<ul class="nav">
		<li><span class="SayHi">欢迎: 
			<%=session.getAttribute("username")%>
		</span>
		</li>
		<li id="search">
			<a href="/resume/resume-main.action?page=0&pageSize=10">返回首页</a>
		</li>
		<li id="search">
			<a href="/resume/resume-list.action">搜索简历</a>
		</li>
		<li id="managerResume">
			<a href="/resume/resume-manager.action">简历管理</a>
		</li>
		<li id="userList">
			<a href="/resume/user-list.action">用户列表</a>
		</li>
		<li id="createUser">
			<a href="/resume/user-create.action">新建用户</a>
		</li>
		<li id="userList">
			<a href="/resume/audit-list.action?page=0&pageSize=20">日志</a>
		</li>
		<li>
			<a href="/resume/login.action">退出</a>
		</li>
	</ul>
</div>
	<div class="main">
  <div class="wrap_top"></div>
  <div class="wrap_l_r l_r_left_insert">
    <div class="wrap_right">
    	<s:form id="system-manager" action="system-manager" method="post">
			<div>
				<table width="80%" border="0" align="left" cellpadding="0" align="center"
					cellspacing="0">
					<tr>
						<td><s:hidden name="managerType" id="managerType"></s:hidden></td>
						<td><s:hidden name="resule" id="resule"></s:hidden></td>
					</tr>
					
					<tr><td>&nbsp;</td></tr>
					<tr>
						<td><h1>备份系统:</h1></td>
					</tr>
					<tr>
						<td><h3>备份文件存放路径:</h3></td>
						<td><s:textfield id="backupLocation" name="backupLocation" size="35" theme="simple" cssClass="input_c"/></td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" id="systemBackupButton" value="备 份 系 统" onclick="backupSystemFun()"/></td>
					</tr>
					<tr><td>&nbsp;</td></tr>
					<tr><td>&nbsp;</td></tr>
					<tr><td><h1>还原系统:</h1></td></tr>
					<tr>
						<td><h3>还原文件路径:</h3></td>
						<td><s:textfield id="restoreLocation" name="restoreLocation" size="35" theme="simple" cssClass="input_c"/></td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" id="systemRestoreButton" value="还 原 系 统" onclick="restoreSystemFun()"/></td>
					</tr>
				</table>
			</div>
		</s:form>
    </div>
  </div>
  <div class="clear"></div>
  <div class="wrap_bottom"></div>
</div>
</body>
</html>